package com.xty.itgroup.tech05tytex.Databean;


import com.xty.itgroup.tech05tytex.Util.ResultEnum;

public class BeanException extends RuntimeException {
    private Integer code;
    private String msg;
    private Object data;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public BeanException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public BeanException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
        this.data = null;
    }
}
